inherited dtmck_StuffInList: Tdtmck_StuffInList
  OldCreateOrder = True
  Left = 781
  Top = 353
  Height = 414
  Width = 659
  inherited adsMaster: TADODataSet
    CursorType = ctStatic
    CommandText = 'Select  * from  V_ck_StuffInList  where 0=1'
    object adsMasterDataType: TStringField
      DisplayLabel = #25968#25454#31867#22411
      FieldName = 'DataType'
      ReadOnly = True
    end
    object adsMasterDeptID: TStringField
      DisplayLabel = #20844#21496'ID'
      FieldName = 'DeptID'
    end
    object adsMasterStockID: TStringField
      DisplayLabel = #20179#24211'ID'
      FieldName = 'StockID'
    end
    object adsMasterStockCode: TStringField
      DisplayLabel = #20179#24211#32534#30721
      FieldName = 'StockCode'
    end
    object adsMasterStockName: TStringField
      DisplayLabel = #20179#24211#21517#31216
      FieldName = 'StockName'
      Size = 50
    end
    object adsMasterBillDate: TDateTimeField
      DisplayLabel = #21333#25454#26085#26399
      FieldName = 'BillDate'
    end
    object adsMasterBillNo: TStringField
      DisplayLabel = #21333#25454#32534#21495
      FieldName = 'BillNo'
    end
    object adsMasterBillType: TStringField
      DisplayLabel = #21333#25454#31867#22411
      FieldName = 'BillType'
    end
    object adsMasterInOutType: TStringField
      DisplayLabel = #20986#20837#31867#22411'ID'
      FieldName = 'InOutType'
    end
    object adsMasterInOutTypename: TStringField
      DisplayLabel = #20986#20837#31867#22411
      FieldName = 'InOutTypename'
      Size = 50
    end
    object adsMasterDrawMan: TStringField
      DisplayLabel = #32463#25163#20154
      FieldName = 'DrawMan'
    end
    object adsMasterDrawManName: TStringField
      DisplayLabel = #32463#25163#20154
      FieldName = 'DrawManName'
    end
    object adsMasterSupplyID: TStringField
      DisplayLabel = #20132#36135#21333#20301'ID'
      FieldName = 'SupplyID'
    end
    object adsMasterSupplyCode: TStringField
      DisplayLabel = #20132#36135#21333#20301#32534#30721
      FieldName = 'SupplyCode'
      ReadOnly = True
    end
    object adsMasterSupplyShortName: TStringField
      DisplayLabel = #20132#36135#21333#20301#31616#31216
      FieldName = 'SupplyShortName'
      ReadOnly = True
      Size = 50
    end
    object adsMasterSupplyFullName: TStringField
      DisplayLabel = #20132#36135#21333#20301#20840#31216
      FieldName = 'SupplyFullName'
      ReadOnly = True
      Size = 200
    end
    object adsMasterDetailSupplyID: TStringField
      DisplayLabel = #20379#24212#21830'ID'
      FieldName = 'DetailSupplyID'
    end
    object adsMasterDetailSupplyCode: TStringField
      DisplayLabel = #20379#24212#21830#32534#30721
      FieldName = 'DetailSupplyCode'
      ReadOnly = True
    end
    object adsMasterDetailSupplyName: TStringField
      DisplayLabel = #20379#24212#21830#21517#31216
      FieldName = 'DetailSupplyName'
      ReadOnly = True
      Size = 50
    end
    object adsMasterRuleChildID: TStringField
      DisplayLabel = #35268#21017'ID'
      FieldName = 'RuleChildID'
      ReadOnly = True
      Size = 50
    end
    object adsMasterFRuleChildID: TStringField
      DisplayLabel = #35268#21017#32534#30721'ID'
      FieldName = 'FRuleChildID'
      ReadOnly = True
      Size = 71
    end
    object adsMasterSourceBillNo: TStringField
      DisplayLabel = #28304#21333#32534#21495
      FieldName = 'SourceBillNo'
    end
    object adsMasterSourceBillDetailNo: TStringField
      DisplayLabel = #28304#21333#26126#32454#32534#21495
      FieldName = 'SourceBillDetailNo'
    end
    object adsMasterProcessID: TStringField
      DisplayLabel = #31867#22411'ID'
      FieldName = 'ProcessID'
    end
    object adsMasterProcessName: TStringField
      DisplayLabel = #31867#22411
      FieldName = 'ProcessName'
      Size = 50
    end
    object adsMasterStuffID: TStringField
      DisplayLabel = #29289#26009'ID'
      FieldName = 'StuffID'
    end
    object adsMasterStuffCode: TStringField
      DisplayLabel = #29289#26009#32534#30721
      FieldName = 'StuffCode'
      Size = 50
    end
    object adsMasterStuffName: TStringField
      DisplayLabel = #29289#26009#21517#31216
      FieldName = 'StuffName'
      Size = 100
    end
    object adsMasterSpecs: TStringField
      DisplayLabel = #35268#26684#22411#21495
      FieldName = 'Specs'
      Size = 200
    end
    object adsMasterStuffHelperCode: TStringField
      DisplayLabel = #29289#26009#21161#35760#30721
      FieldName = 'StuffHelperCode'
      Size = 100
    end
    object adsMasterBatchNo: TStringField
      DisplayLabel = #25209#21495
      FieldName = 'BatchNo'
      Size = 50
    end
    object adsMasterColorName: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
      Size = 50
    end
    object adsMasterProperties: TStringField
      DisplayLabel = #23646#24615
      FieldName = 'Properties'
      Size = 50
    end
    object adsMasterPieceCount: TIntegerField
      DisplayLabel = #20214#25968
      FieldName = 'PieceCount'
      ReadOnly = True
    end
    object adsMasterNumber: TFloatField
      DisplayLabel = #25968#37327
      FieldName = 'Number'
    end
    object adsMasterUnitID: TStringField
      DisplayLabel = #21333#20301'ID'
      FieldName = 'UnitID'
    end
    object adsMasterUnitName: TStringField
      DisplayLabel = #21333#20301
      FieldName = 'UnitName'
      Size = 10
    end
    object adsMasterPrice: TFloatField
      DisplayLabel = #21333#20215
      FieldName = 'Price'
    end
    object adsMasterMoney: TFloatField
      DisplayLabel = #37329#39069
      FieldName = 'Money'
    end
    object adsMasterDetailRemark: TStringField
      DisplayLabel = #26126#32454#22791#27880
      FieldName = 'DetailRemark'
      Size = 50
    end
  end
  inherited adsMasterEdit: TADODataSet
    CursorType = ctStatic
  end
  object adsUserCompany: TADODataSet
    Connection = dtmConnect.conMain
    LockType = ltBatchOptimistic
    CommandText = 
      'select b.DeptID, b.DeptCode, b.DeptName from xt_CompanySet a '#13#10'j' +
      'oin da_Department b on a.CompanyID=b.DeptID'#13#10'where a.UserID=(sel' +
      'ect UserID from xt_Users where UserCode=:UserCode)'
    Parameters = <
      item
        Name = 'UserCode'
        Size = -1
        Value = Null
      end>
    Left = 176
    Top = 104
  end
  object adsUserStock: TADODataSet
    Connection = dtmConnect.conMain
    LockType = ltBatchOptimistic
    CommandText = 
      'select b.StockID, b.StockCode, b.StockName from xt_StockSet a '#13#10 +
      'join da_Stock b on a.StockID=b.StockID'#13#10'where b.DeptID=:DeptID'#13#10 +
      ' and a.UserID=(select UserID from xt_Users where UserCode=:UserC' +
      'ode)'#13#10' and isnull(b.StockType,0)=:StockType and isnull(b.HasStop' +
      ',0)=0'
    Parameters = <
      item
        Name = 'DeptID'
        Size = -1
        Value = Null
      end
      item
        Name = 'UserCode'
        Size = -1
        Value = Null
      end
      item
        Name = 'StockType'
        Size = -1
        Value = Null
      end>
    Left = 296
    Top = 104
  end
  object adsStuffType: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    CommandText = 
      'select * from V_da_StuffALLType2'#13#10'where ClassID=:ClassID'#13#10' order' +
      ' by RuleChildID'
    Parameters = <
      item
        Name = 'ClassID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end>
    Left = 168
    Top = 32
  end
  object adsStuffStockUseList: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    AfterOpen = adsMasterAfterOpen
    BeforePost = adsMasterBeforePost
    OnNewRecord = adsMasterNewRecord
    CommandText = 
      'Select * from V_ck_StuffStockUseList where DeptID=:DeptID'#13#10'  and' +
      ' StockID=:StockID and PosID=:PosID and SupplyID=:SupplyID'#13#10'  and' +
      ' ProcessID=:ProcessID and StuffID=:StuffID'#13#10'  and isnull(BatchNo' +
      ','#39#39')=:BatchNo and isnull(ColorName,'#39#39')=:ColorName'#13#10'  and isnull(' +
      'Properties,'#39#39')=:Properties and isnull(Status,0)=0'
    CommandTimeout = 0
    EnableBCD = False
    Parameters = <
      item
        Name = 'DeptID'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'StockID'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'PosID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'SupplyID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'ProcessID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'StuffID'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'BatchNo'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'ColorName'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'Properties'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end>
    Left = 296
    Top = 32
    object IntegerField1: TIntegerField
      DisplayLabel = #20027#38190'ID'
      FieldName = 'ID'
    end
    object adsStuffStockUseListBusyNumber: TFloatField
      DisplayLabel = #39044#30041'|'#25968#37327
      FieldName = 'BusyNumber'
    end
    object adsStuffStockUseListUsedNumber: TFloatField
      DisplayLabel = #39044#30041'|'#24050#29992
      FieldName = 'UsedNumber'
    end
    object FloatField3: TFloatField
      DisplayLabel = #39044#30041'|'#21487#29992
      FieldName = 'ValidNumber'
      ReadOnly = True
    end
    object StringField23: TStringField
      DisplayLabel = #29289#26009#20998#31867'ID'
      FieldName = 'StuffType'
    end
    object StringField24: TStringField
      DisplayLabel = #29289#26009#20998#31867
      FieldName = 'StuffTypeName'
      Size = 50
    end
    object StringField25: TStringField
      DisplayLabel = #29289#26009#20998#31867#35268#21017'ID'
      FieldName = 'RuleChildID'
      Size = 50
    end
    object adsStuffStockUseListSourceBillType: TStringField
      DisplayLabel = #26469#28304#31867#22411'ID'
      FieldName = 'SourceBillType'
    end
    object adsStuffStockUseListSourceBillTypeName: TStringField
      DisplayLabel = #26469#28304#31867#22411
      FieldName = 'SourceBillTypeName'
    end
    object adsStuffStockUseListSourceBillNo: TStringField
      DisplayLabel = #26469#28304#21333#21495
      FieldName = 'SourceBillNo'
    end
    object adsStuffStockUseListStatus: TWordField
      DisplayLabel = #39044#30041#29366#24577
      FieldName = 'Status'
    end
    object adsStuffStockUseListWriter: TStringField
      DisplayLabel = #25805#20316#20154
      FieldName = 'Writer'
    end
    object adsStuffStockUseListWriteTime: TDateTimeField
      DisplayLabel = #25805#20316#26102#38388
      FieldName = 'WriteTime'
    end
    object adsStuffStockUseListModifier: TStringField
      DisplayLabel = #20462#25913#20154
      FieldName = 'Modifier'
    end
    object adsStuffStockUseListModifyTime: TDateTimeField
      DisplayLabel = #20462#25913#26102#38388
      FieldName = 'ModifyTime'
    end
    object adsStuffStockUseListRemark: TStringField
      DisplayLabel = #22791#27880
      FieldName = 'Remark'
      Size = 500
    end
  end
  object adsStockSum: TADODataSet
    Connection = dtmConnect.conMain
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    AfterOpen = adsMasterAfterOpen
    BeforePost = adsMasterBeforePost
    OnNewRecord = adsMasterNewRecord
    CommandText = 
      'Select *,dbo.xt_SplitNumber(dbo.V_ck_TotalStuffStock.Number, 1) ' +
      'as PDNumber, dbo.xt_SplitNumber(dbo.V_ck_TotalStuffStock.Number,' +
      ' 0) as PDQty'#13#10'from V_ck_TotalStuffStock'#13#10'where 0=1'
    CommandTimeout = 0
    EnableBCD = False
    Parameters = <>
    Left = 464
    Top = 96
    object StringField1: TStringField
      DisplayLabel = #20844#21496'ID'
      FieldName = 'DeptID'
    end
    object StringField2: TStringField
      DisplayLabel = #20179#24211'ID'
      FieldName = 'StockID'
    end
    object StringField3: TStringField
      DisplayLabel = #20179#24211#32534#30721
      FieldName = 'StockCode'
    end
    object StringField4: TStringField
      DisplayLabel = #20179#24211
      FieldName = 'StockName'
    end
    object StringField12: TStringField
      DisplayLabel = #31867#22411'ID'
      FieldName = 'ProcessID'
    end
    object StringField13: TStringField
      DisplayLabel = #31867#22411
      FieldName = 'ProcessName'
    end
    object StringField14: TStringField
      DisplayLabel = #29289#26009'ID'
      FieldName = 'StuffID'
    end
    object StringField15: TStringField
      DisplayLabel = #29289#26009#32534#30721
      FieldName = 'StuffCode'
      Size = 50
    end
    object StringField16: TStringField
      DisplayLabel = #29289#26009#21517#31216
      FieldName = 'StuffName'
      Size = 50
    end
    object StringField17: TStringField
      DisplayLabel = #22411#21495#35268#26684
      FieldName = 'StuffSpecs'
      Size = 100
    end
    object adsStockSumBrand: TStringField
      DisplayLabel = #21697#29260
      FieldName = 'Brand'
    end
    object StringField18: TStringField
      DisplayLabel = #29289#26009#21161#35760#30721
      FieldName = 'StuffHelperCode'
      Size = 50
    end
    object StringField19: TStringField
      DisplayLabel = #25209#21495
      FieldName = 'BatchNo'
      Size = 50
    end
    object StringField20: TStringField
      DisplayLabel = #39068#33394
      FieldName = 'ColorName'
      Size = 50
    end
    object StringField21: TStringField
      DisplayLabel = #23646#24615
      FieldName = 'Properties'
      Size = 50
    end
    object FloatField1: TFloatField
      Alignment = taLeftJustify
      DisplayLabel = #23384#36135'|'#25968#37327
      FieldName = 'Number'
    end
    object StringField22: TStringField
      DisplayLabel = #21333#20301'ID'
      FieldName = 'UnitID'
    end
    object StringField26: TStringField
      DisplayLabel = #21333#20301
      FieldName = 'UnitName'
      Size = 10
    end
    object adsStockSumStuffType: TStringField
      FieldName = 'StuffType'
    end
    object StringField28: TStringField
      DisplayLabel = #29289#26009#20998#31867
      FieldName = 'StuffTypeName'
      Size = 50
    end
    object StringField29: TStringField
      DisplayLabel = #29289#26009#20998#31867#35268#21017'ID'
      FieldName = 'RuleChildID'
      Size = 50
    end
  end
end
